<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>图片上传</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
        }
        .container {
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            text-align: center;
            color: #333;
        }
        form {
            display: flex;
            flex-direction: column;
            margin-top: 20px;
        }
        form input[type="text"],
        form input[type="file"] {
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        form input[type="submit"] {
            padding: 10px 20px;
            background-color: #5cb85c;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        form input[type="submit"]:hover {
            background-color: #4cae4c;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>上传图片</h1>
    <%
        String PName = request.getParameter("PName");
    %>
    <form method="post" action="/OnlineShopping/UploadServlet" enctype="multipart/form-data">
        商品名称：
        <input type="text" name="PName" value="<%= PName %>" readonly/>
        <br/><br/>
        选择一个作为商品封面:
        <input type="file" name="uploadFile1" />
        <br/><br/>
        选择一个作为商品展示:
        <input type="file" name="uploadFile2" />
        <br/><br/>
        选择一个作为商品展示2:
        <input type="file" name="uploadFile3" />
        <br/><br/>
        <input type="submit" value="上传" />
    </form>
</div>
</body>
</html>